package com.ios.common.login.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ios.common.login.dao.ILoginDAO;
import com.ios.common.login.service.ILoginService;
import com.ios.common.login.vo.LoginUserVO;
import com.ios.common.pojo.IosSysUser;

@Service
public class LoginServiceImpl implements ILoginService{

	@Resource(name = "loginDAO")
	private ILoginDAO loginDAO;
	
	public LoginUserVO queryUserInfoByUserCodeAndPassword(String userCode, String password) {
		IosSysUser ioisSysUser = this.loginDAO.queryUserInfoByUserCodeAndPassword(userCode, password);
		if(null == ioisSysUser){
			return null;
		}
		LoginUserVO userVO = new LoginUserVO();
		userVO.setIosSysUser(ioisSysUser);
		return userVO;
	}
	
	public void setLoginDAO(ILoginDAO loginDAO) {
		this.loginDAO = loginDAO;
	}
}
